package com.noah.service.impl;

import java.util.List;

import org.hibernate.Hibernate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.noah.dao.HibernateDao;
import com.noah.entity.AegisCorporation;
import com.noah.service.AegisCorporationService;

@Service
@Transactional(readOnly=true)
public class AegisCorporationServiceImpl implements AegisCorporationService{
	
	@Autowired
	HibernateDao dao;
	
	@Override
	public List<AegisCorporation> findAll() {
		String str = "select * from t_aegis_corporation";
		//return dao.getSession().createSQLQuery(str).list();
		return dao.getSession().createSQLQuery(str).addEntity(AegisCorporation.class).list();
	}

}
